package com.yuyou.tas.lesson.vo.req;

import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
* @author chengsiyuan
* @create 2018/5/17-10:12
**/
public class ReqAddBaseMaterial implements Serializable {


    /**
     * 素材名称
     */
    @NotBlank(message="素材名称 不能为空")
    @Length(max = 40 , message = "素材名称不能超过40个字")
    @ApiModelProperty(value = "讲次名称", required = true)
    private String name;

    /**
     * 科目
     */
    @NotNull(message="科目ID 不能为空")
    @ApiModelProperty(value = "科目ID", required = true)
    private Long dataSubject;

    /**
     * 层次
     */
    @NotNull(message="层次ID 不能为空")
    @ApiModelProperty(value = "层次ID", required = true)
    private Long baseLevelId;

    /**
     * 年级
     */
    @NotNull(message="年级IDs 不能为空")
    @ApiModelProperty(value = "年级IDs，多个用逗号隔开", required = true)
    private String[] baseSectionId;

    /**
     * 学期
     */
    @ApiModelProperty(value = "学期ID")
    private Long baseTrimesterId;

    /**
     * 资料说明
     */
    @ApiModelProperty(value = "资料说明")
    @Length(max = 500 , message = "素材说明不能超过500个字")
    private String remark;

    /**
     * 资料名称
     */
    @NotNull(message="文件名称 不能为空")
    @ApiModelProperty(value = "文件名称" , required = true)
    private String attchName;

    /**
     * 类型
            0：UNKNOW
            1：PPT
            2：WORD
            3：EXCEL
            4：PDF
            5：RAR
     */
    @NotNull(message="类型 不能为空")
    @Range(min = 0,max = 6,message = "参数在0-5之间")
    @ApiModelProperty(value = "类型：0：UNKNOW、1：PPT、2：WORD、3：EXCEL、4：PDF、5：RAR、6：vedio", required = true)
    private Long attchType;

    /**
     * 地址
     */
    @NotNull(message="地址 不能为空")
    @ApiModelProperty(value = "地址", required = true)
    private String attchUrl;

    /**
     * 大小
     */
    @NotNull(message="大小 不能为空")
    @ApiModelProperty(value = "大小", required = true)
    private BigDecimal attchSize;

    /**
     * 权限（是否课预览）
     */
    @NotNull(message="权限（是否课预览） 不能为空")
    @Range(min = 0,max = 1,message = "参数只能为0或1")
    @ApiModelProperty(value = "权限（是否课预览,是：1、否：0）", required = true)
    private Integer isView;

    /**
     * 权限（是否课下载）
     */
    @NotNull(message="权限（是否课下载） 不能为空")
    @Range(min = 0,max = 1,message = "参数只能为0或1")
    @ApiModelProperty(value = "权限（是否课下载,是：1、否：0）", required = true)
    private Integer isDowm;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getDataSubject() {
        return dataSubject;
    }

    public void setDataSubject(Long dataSubject) {
        this.dataSubject = dataSubject;
    }

    public Long getBaseLevelId() {
        return baseLevelId;
    }

    public void setBaseLevelId(Long baseLevelId) {
        this.baseLevelId = baseLevelId;
    }

    public String[] getBaseSectionId() {
        return baseSectionId;
    }

    public void setBaseSectionId(String[] baseSectionId) {
        this.baseSectionId = baseSectionId;
    }

    public Long getBaseTrimesterId() {
        return baseTrimesterId;
    }

    public void setBaseTrimesterId(Long baseTrimesterId) {
        this.baseTrimesterId = baseTrimesterId;
    }

//    public String getRemark() {
//        return remark;
//    }
//
//    public void setRemark(String remark) {
//        this.remark = remark;
//    }

    public String getAttchName() {
        return attchName;
    }

    public void setAttchName(String attchName) {
        this.attchName = attchName;
    }

    public Long getAttchType() {
        return attchType;
    }

    public void setAttchType(Long attchType) {
        this.attchType = attchType;
    }

    public String getAttchUrl() {
        return attchUrl;
    }

    public void setAttchUrl(String attchUrl) {
        this.attchUrl = attchUrl;
    }

    public BigDecimal getAttchSize() {
        return attchSize;
    }

    public void setAttchSize(BigDecimal attchSize) {
        this.attchSize = attchSize;
    }

    public Integer getIsView() {
        return isView;
    }

    public void setIsView(Integer isView) {
        this.isView = isView;
    }

    public Integer getIsDowm() {
        return isDowm;
    }

    public void setIsDowm(Integer isDowm) {
        this.isDowm = isDowm;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}